package com.renwei.yunlong.activity.me;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.renwei.yunlong.R;
import com.renwei.yunlong.base.BaseActivity;
import com.renwei.yunlong.utils.PackageUtils;
import com.renwei.yunlong.utils.CommonUtils;
import com.zyf.fwms.commonlibrary.utils.StatusBarUtil;

import butterknife.Bind;
import butterknife.ButterKnife;

/**
 * 关于--云龙--页面
 * <p>
 * Created by Administrator on 2017/8/25.
 */

public class AboutActivity extends BaseActivity implements View.OnClickListener {

    @Bind(R.id.iv_back)
    ImageView ivBack;
    @Bind(R.id.tv_title)
    TextView tvTitle;
    @Bind(R.id.tv_right)
    TextView tvRight;
    @Bind(R.id.iv_logo)
    ImageView ivLogo;
    @Bind(R.id.tv_version)
    TextView tvVersion;
    @Bind(R.id.tv_content)
    TextView tvContent;
    private String versionName = "";

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_about);
        ButterKnife.bind(this);
        StatusBarUtil.setColor(this, CommonUtils.getColor(this, R.color.title_color), 0);
        versionName = PackageUtils.getVersionName(this);
        initData();
    }

    private void initData() {
        ivBack.setVisibility(View.VISIBLE);
        ivBack.setOnClickListener(this);
        tvVersion.setText("当前版本" + versionName);
        tvTitle.setText("关于云呐");
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.iv_back:
                finish();
                break;
            default:
                break;
        }
    }
}
